package com.czd.support.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.czd.base.model.Paginate;
import com.czd.base.service.BaseService;
import com.czd.support.common.Configuration;
import com.czd.support.model.Video;

/**
 * 视频文件业务层
 * @author caoren
 *
 */
@Service
public class VideoService extends BaseService<Video>{
	public List<Video> getVideos(){
		return this.selectList(sqlId("getVideos"));
	}
	
	public Paginate queryForPage(Video video){
		video.setPageSize(Configuration.getInstance().getDefault_page_size());
		return this.queryForPaginate(sqlId("queryForPage"), video);
	}
	
	public Video findById(int id){
		return this.selectOneById(sqlId("findById"), id);
	}
	
	public boolean update(Video video){
		return this.update(sqlId("update"), video);
	}
}
